﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="GroupMaintain.aspx.vb" Inherits="WebForm_Manage_GroupMaintain" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table>
                <tr style="text-align: center;">
                    <td>
                        <asp:HiddenField ID="hiUID" runat="server" />
                        <asp:HiddenField ID="hidbName" runat="server" />
                        <asp:Label ID="lblTitle" runat="server" SkinID="title" meta:resourcekey="lblTitle"></asp:Label>
                        <asp:ObjectDataSource ID="objDSGroupID" runat="server" SelectMethod="GetGroupIDInsert"
                            TypeName="OAMS.BBL.GroupBBL" UpdateMethod="UpdateGroupID">
                            <UpdateParameters>
                                <asp:Parameter Name="GroupID" Type="String" />
                                <asp:Parameter Name="GroupName" Type="String" />
                                <asp:ControlParameter ControlID="hiUID" Name="UID" PropertyName="Value" Type="String" />
                                <asp:Parameter Name="canModi" Type="Boolean" />
                                <asp:Parameter Name="RootID" Type="String" />
                                <asp:ControlParameter ControlID="hidbName" Name="dbName" PropertyName="Value" />
                            </UpdateParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidbName" Name="dbName" PropertyName="Value" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td>
                        <TServerControl:TGridView ID="gvGroup" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                            AllowPaging="True" DataSourceID="objDSGroupID" ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="False"
                            SkinID="pager" TotalRowCount="0" Width="400px" AutoGenerateColumns="False">
                            <Columns>
                                <asp:TemplateField ItemStyle-Wrap="False">
                                    <EditItemTemplate>
                                        <asp:Button ID="btnUpdate" CommandName="Update" runat="server" meta:resourcekey="btnUpdate" />
                                        <asp:Button ID="btnCancel" CommandName="Cancel" runat="server" meta:resourcekey="btnCancel" />
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Button ID="btnEdit" CommandName="Edit" meta:resourcekey="btnEdit" runat="server"
                                            Text="Button" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="GroupID">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtGroupID" runat="server" Enabled='<%# Bind("canModi") %>' Text='<%# Bind("GroupID") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("GroupID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="GroupName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtGroupName" runat="server" Text='<%# Bind("GroupName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("GroupName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField meta:resourcekey="RootID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlGroupIDE" runat="server" DataSourceID="objDSGroupIDInsertDT"
                                            DataTextField="GroupName" DataValueField="GroupID" SelectedValue='<%# Bind("RootID") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlGroupID" runat="server" AutoPostBack="True" DataSourceID="objDSGroupIDInsertDT"
                                            DataTextField="GroupName" DataValueField="GroupID" Enabled="False" SelectedValue='<%# Bind("RootID") %>'>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </TServerControl:TGridView>
                         <asp:ObjectDataSource ID="objDSGroupIDInsertDT" runat="server" SelectMethod="GetGroupIDInsert"
                            TypeName="OAMS.BBL.GroupBBL">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <br />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
